package top.lshaci.learning.jvm.gc;

/**
 * GCLogTest
 *
 * @author lshaci
 * @date 2020/8/13 10:44
 * @since 1.0.0
 */
public class GCLogTest {

    public static final int _1MB = 1 * 1024 * 1024;

    public static void allocation() {
        byte[] allocation1 = new byte[2 * _1MB];
        byte[] allocation2 = new byte[2 * _1MB];
        byte[] allocation3 = new byte[2 * _1MB];
        byte[] allocation4 = new byte[4 * _1MB];
    }

    /**
     * -Xms20m -Xmx20m -Xmn10m -XX:NewRatio=8 -XX:+PrintGCDetails
     */
    public static void main(String[] args) {
        allocation();
    }
}
